package com.insight.common.api.dto;

import lombok.Data;

import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;

/**
 * 文件下载DTO，封装文件下载相关参数，供 cloud api 使用。
 */
@Data
public class FileDownDTO implements Serializable {

    private static final long serialVersionUID = 6749126258686446019L;

    /**
     * 文件路径
     */
    private String filePath;

    /**
     * 上传路径
     */
    private String uploadpath;

    /**
     * 上传类型
     */
    private String uploadType;

    /**
     * 响应对象
     */
    private HttpServletResponse response;

    public FileDownDTO(){}

    /**
     * 构造方法，初始化文件下载参数。
     * @param filePath 文件路径
     * @param uploadpath 上传路径
     * @param uploadType 上传类型
     * @param response 响应对象
     */
    public FileDownDTO(String filePath, String uploadpath, String uploadType,HttpServletResponse response){
        this.filePath = filePath;
        this.uploadpath = uploadpath;
        this.uploadType = uploadType;
        this.response = response;
    }
}
